package com.cn.learn.jpa.controller;

import com.cn.learn.jpa.domain.jpa.Game;
import com.cn.learn.jpa.domain.model.ResultModel;
import com.cn.learn.jpa.service.IGameService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @ClassName GameController
 * @Description 游戏控制器
 * @Author JiJiang
 * @Date 2023/7/1 22:53
 * @Version 1.0
 */
@RestController
@RequestMapping("/game")
public class GameController {


    @Resource
    private IGameService gameService;

    @PostMapping
    public ResultModel add(@RequestBody Game toAdd) {

        return gameService.saveGame(toAdd);

    }


}
